import axios from 'axios'
import request from '../../utils/request';

export const login = async (params: { user_id: number; password: string }) => {
  return await request.post('/api/login', params)
}

export const getVehiclesInfoList = async () => {
  return await request.get('/api/vehicle/vehicles_info')
}

export const getVehiclesCountByStatus = async()=>{
  return await request.get('/api/vehicle/vehicles_status')
}

export const getDriversCountByStatus = async()=>{
  return await request.get('/api/driver/drivers_status')
}

export const getVehiclesMileList = async()=>{
  return await request.get('/api/vehicle/vehicles_mile')
}

export const getVehiclesUseTimesList = async()=>{
  return await request.get('/api/vehicle/vehicles_use_time')
}

export const deleteVehicle = async (params: { vehicle_id: string }) => {
  console.log(params)
  return await request.post('/api/vehicle/delete_vehicle', params)
}